/**
 * Abstract class that builds a Road Map of a section of Westwood.
 * Location: North-East of the I-405 and I-10 interchange.
 * @author Jared Lindbl�m
 */
public abstract class WestwoodMap {

	/**
	 * Creates a Road Map of a section of Westwood.
	 * @param map	The Road Map to create.
	 */
	public static void createMap(RoadMap map) {
		String[] NorthSouth = {"Prosser Ave", "Parnell Ave", "Manning Ave", "Pelham Ave",
				"Overland Ave", "Selby Ave", "Malcom Ave", "Glendon Ave",
				"Westwood Blvd", "Midvale Ave", "Kelton Ave", "Veteran Ave",
				"Greenfield Ave", "Camden Ave", "Bentley Ave", "Sepulveda Blvd"};

		double[] NorthSouthDistances = {10.0, 10.0, 10.0, 10.0,
				10.0, 10.0, 10.0, 10.0,
				10.0, 10.0, 10.0, 10.0,
				10.0, 10.0, 10.0, 10.0};

		int[] NorthSouthWeights = {0, 0, 0, 0,
				0, 0, 0, 0,
				0, 0, 0, 0,
				0, 0, 0, 0};

		int[] NorthSouthMaxVehicles = {10, 10, 10, 10,
				10, 10, 10, 10,
				10, 10, 10, 10,
				10, 10, 10, 10};

		String[] EastWest = {"Santa Monica Blvd", "Missouri Ave", "La Grange Ave", "Mississippi Ave",
				"Olympic Blvd", "Tennessee Ave", "Pico Blvd"};

		double[] EastWestDistances = {10.0, 10.0, 10.0, 10.0,
				10.0, 10.0, 10.0};

		int[] EastWestWeights = {0, 0, 0, 0,
				0, 0, 0};

		int[] EastWestMaxVehicles = {10, 10, 10, 10,
				10, 10, 10};

		for (int i = 0; i < NorthSouth.length; i++) {
			map.addRoad(NorthSouth[i], new NorthSouthRoad(NorthSouth[i], NorthSouthDistances[i], NorthSouthWeights[i], NorthSouthMaxVehicles[i]));
		}

		for (int i = 0; i < EastWest.length; i++) {
			map.addRoad(EastWest[i], new EastWestRoad(EastWest[i], EastWestDistances[i], EastWestWeights[i], EastWestMaxVehicles[i]));
		}

		for (int i = 0; i < NorthSouth.length; i++) {
			for (int j = 0; j < EastWest.length; j++) {
				map.addIntersection(NorthSouth[i] + "/" + EastWest[j], new Intersection(NorthSouth[i] + "/" + EastWest[j]));
				(map.getIntersection(NorthSouth[i] + "/" + EastWest[j])).addRoad(map.getRoad(NorthSouth[i]));
				(map.getIntersection(NorthSouth[i] + "/" + EastWest[j])).addRoad(map.getRoad(EastWest[j]));
				(map.getRoad(NorthSouth[i])).addIntersection(map.getIntersection(NorthSouth[i] + "/" + EastWest[j]));
				(map.getRoad(EastWest[j])).addIntersection(map.getIntersection(NorthSouth[i] + "/" + EastWest[j]));
			}
		}
	}
}